﻿<UserControl x:Class="Sovacode.DemoApp.View.SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="33"/>
            <RowDefinition Height="33"/>
            <RowDefinition Height="33"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <TextBlock Grid.Column="0" Grid.Row="0" Text="String setting:" Margin="5,5,5,0" VerticalAlignment="Center"/>
        <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding StringSetting, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10,5,10,5" VerticalContentAlignment="Center"/>

        <TextBlock Grid.Column="0" Grid.Row="1" Text="Int setting:" Margin="5,5,5,0" VerticalAlignment="Center"/>
        <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding IntSetting, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10,5,10,5" VerticalContentAlignment="Center"/>
        
        <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal">
            <Button Content="_Save" Margin="10,5" Width="150" Command="{Binding [SaveSettings]}"/>
            <Button Content="_Restore" Margin="10,5" Width="150" Command="{Binding [LoadSettings]}"/>
        </StackPanel>
        
    </Grid>
    
</UserControl>
